3.1.95 \(\int \frac {(a+b x)^3 (A+B x)}{x} \, dx\)

Optimal. Leaf size=54 \[ a^3 A \log (x)+3 a^2 A b x+\frac {3}{2} a A b^2 x^2+\frac {B (a+b x)^4}{4 b}+\frac {1}{3} A b^3 x^3 \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {80, 43} \begin {gather*} 3 a^2 A b x+a^3 A \log (x)+\frac {3}{2} a A b^2 x^2+\frac {B (a+b x)^4}{4 b}+\frac {1}{3} A b^3 x^3 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*x)^3*(A + B*x))/x,x]

[Out]

3*a^2*A*b*x + (3*a*A*b^2*x^2)/2 + (A*b^3*x^3)/3 + (B*(a + b*x)^4)/(4*b) + a^3*A*Log[x]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 80

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(c + d*x)
^(n + 1)*(e + f*x)^(p + 1))/(d*f*(n + p + 2)), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rubi steps

\begin {align*} \int \frac {(a+b x)^3 (A+B x)}{x} \, dx &=\frac {B (a+b x)^4}{4 b}+A \int \frac {(a+b x)^3}{x} \, dx\\ &=\frac {B (a+b x)^4}{4 b}+A \int \left (3 a^2 b+\frac {a^3}{x}+3 a b^2 x+b^3 x^2\right ) \, dx\\ &=3 a^2 A b x+\frac {3}{2} a A b^2 x^2+\frac {1}{3} A b^3 x^3+\frac {B (a+b x)^4}{4 b}+a^3 A \log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 63, normalized size = 1.17 \begin {gather*} a^3 A \log (x)+\frac {1}{12} x \left (12 a^3 B+18 a^2 b (2 A+B x)+6 a b^2 x (3 A+2 B x)+b^3 x^2 (4 A+3 B x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x)^3*(A + B*x))/x,x]

[Out]

(x*(12*a^3*B + 18*a^2*b*(2*A + B*x) + 6*a*b^2*x*(3*A + 2*B*x) + b^3*x^2*(4*A + 3*B*x)))/12 + a^3*A*Log[x]

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(a+b x)^3 (A+B x)}{x} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((a + b*x)^3*(A + B*x))/x,x]

[Out]

IntegrateAlgebraic[((a + b*x)^3*(A + B*x))/x, x]

________________________________________________________________________________________

fricas [A]  time = 1.11, size = 68, normalized size = 1.26 \begin {gather*} \frac {1}{4} \, B b^{3} x^{4} + A a^{3} \log \relax (x) + \frac {1}{3} \, {\left (3 \, B a b^{2} + A b^{3}\right )} x^{3} + \frac {3}{2} \, {\left (B a^{2} b + A a b^{2}\right )} x^{2} + {\left (B a^{3} + 3 \, A a^{2} b\right )} x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^3*(B*x+A)/x,x, algorithm="fricas")

[Out]

1/4*B*b^3*x^4 + A*a^3*log(x) + 1/3*(3*B*a*b^2 + A*b^3)*x^3 + 3/2*(B*a^2*b + A*a*b^2)*x^2 + (B*a^3 + 3*A*a^2*b)
*x

________________________________________________________________________________________

giac [A]  time = 1.17, size = 70, normalized size = 1.30 \begin {gather*} \frac {1}{4} \, B b^{3} x^{4} + B a b^{2} x^{3} + \frac {1}{3} \, A b^{3} x^{3} + \frac {3}{2} \, B a^{2} b x^{2} + \frac {3}{2} \, A a b^{2} x^{2} + B a^{3} x + 3 \, A a^{2} b x + A a^{3} \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^3*(B*x+A)/x,x, algorithm="giac")

[Out]

1/4*B*b^3*x^4 + B*a*b^2*x^3 + 1/3*A*b^3*x^3 + 3/2*B*a^2*b*x^2 + 3/2*A*a*b^2*x^2 + B*a^3*x + 3*A*a^2*b*x + A*a^
3*log(abs(x))

________________________________________________________________________________________

maple [A]  time = 0.00, size = 70, normalized size = 1.30 \begin {gather*} \frac {B \,b^{3} x^{4}}{4}+\frac {A \,b^{3} x^{3}}{3}+B a \,b^{2} x^{3}+\frac {3 A a \,b^{2} x^{2}}{2}+\frac {3 B \,a^{2} b \,x^{2}}{2}+A \,a^{3} \ln \relax (x )+3 A \,a^{2} b x +B \,a^{3} x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^3*(B*x+A)/x,x)

[Out]

1/4*B*b^3*x^4+1/3*A*b^3*x^3+B*x^3*a*b^2+3/2*a*A*b^2*x^2+3/2*B*x^2*a^2*b+3*a^2*A*b*x+a^3*B*x+a^3*A*ln(x)

________________________________________________________________________________________

maxima [A]  time = 1.16, size = 68, normalized size = 1.26 \begin {gather*} \frac {1}{4} \, B b^{3} x^{4} + A a^{3} \log \relax (x) + \frac {1}{3} \, {\left (3 \, B a b^{2} + A b^{3}\right )} x^{3} + \frac {3}{2} \, {\left (B a^{2} b + A a b^{2}\right )} x^{2} + {\left (B a^{3} + 3 \, A a^{2} b\right )} x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^3*(B*x+A)/x,x, algorithm="maxima")

[Out]

1/4*B*b^3*x^4 + A*a^3*log(x) + 1/3*(3*B*a*b^2 + A*b^3)*x^3 + 3/2*(B*a^2*b + A*a*b^2)*x^2 + (B*a^3 + 3*A*a^2*b)
*x

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 63, normalized size = 1.17 \begin {gather*} x\,\left (B\,a^3+3\,A\,b\,a^2\right )+x^3\,\left (\frac {A\,b^3}{3}+B\,a\,b^2\right )+\frac {B\,b^3\,x^4}{4}+A\,a^3\,\ln \relax (x)+\frac {3\,a\,b\,x^2\,\left (A\,b+B\,a\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x)*(a + b*x)^3)/x,x)

[Out]

x*(B*a^3 + 3*A*a^2*b) + x^3*((A*b^3)/3 + B*a*b^2) + (B*b^3*x^4)/4 + A*a^3*log(x) + (3*a*b*x^2*(A*b + B*a))/2

________________________________________________________________________________________

sympy [A]  time = 0.27, size = 73, normalized size = 1.35 \begin {gather*} A a^{3} \log {\relax (x )} + \frac {B b^{3} x^{4}}{4} + x^{3} \left (\frac {A b^{3}}{3} + B a b^{2}\right ) + x^{2} \left (\frac {3 A a b^{2}}{2} + \frac {3 B a^{2} b}{2}\right ) + x \left (3 A a^{2} b + B a^{3}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**3*(B*x+A)/x,x)

[Out]

A*a**3*log(x) + B*b**3*x**4/4 + x**3*(A*b**3/3 + B*a*b**2) + x**2*(3*A*a*b**2/2 + 3*B*a**2*b/2) + x*(3*A*a**2*
b + B*a**3)

________________________________________________________________________________________